package com.sskj.mine.presenter;

import com.lzy.okgo.model.Response;
import com.sskj.mine.bean.UserAgreeMent;
import com.sskj.mine.http.HttpConfig;
import com.sskj.mine.ui.activity.WebActivity;
import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonCallBack;


public class WebActivityPresenter extends BasePresenter<WebActivity> {
    /**
     * 获取注册协议
     *
     * @return
     */
    public void getXieyi() {
        httpService.getXieyi()
                .execute(new JsonCallBack<HttpData<UserAgreeMent>>(this) {
                    @Override
                    public void onSuccess(Response<HttpData<UserAgreeMent>> response) {
                        HttpData<UserAgreeMent> httpData = response.body();
                        if (httpData.getStatus() == HttpConfig.OK) {
                            mView.updataUI(httpData.getData());
                        }
                    }
                });
    }
}
